﻿using System.Threading.Tasks;
using VisionCloud.Domain.Common;
using VisionCloud.Domain.DtoModel.Sys;
using VisionCloud.Domain.Repository.Interface.Sys;
using VisionCloud.Domain.UnitOfWork;

namespace VisionCloud.Service.Sys
{
    public class SysDeviceUnlockService
    {
        public IUnitOfWork UnitOfWork { get; set; }

        public ISysDeviceUnlockRepository SysDeviceUnlockRepository { get; set; }

        /// <summary>
        /// 解锁控屏
        /// </summary>
        /// <param name="unlock"></param>
        /// <returns></returns>
        public async Task<ApiResult> UnlockDevice(SysDeviceUnlockDto unlock)
        {
            return await Task.Run<ApiResult>(async () =>
            {
                return SysDeviceUnlockRepository.UnlockDevice(unlock);
            });
        }
    }
}